
from selenium.webdriver.common.by import By


class StudentDetailLocator:
    """
    班主任平台学员详情页面定位
    """
    # 搜索页面-学号输入框
    stuNumInput_loc = (By.XPATH, "//ion-input[@placeholder='学号']")
    # 搜索页面-搜索按钮
    searchButton_loc = (By.XPATH, "//div[@class='search operateButton' and contains(.,'搜索')]")
    # 点击英文名
    clickEnglishName_loc = (By.XPATH, "//span[text()='tiantian']")

    # 进入学员详情
    clickMoreInfo_loc = (By.XPATH, "//ion-label[text()='更多信息']")
    # 选择开课状态的下拉框
    selectCourseStatus_loc = (By.XPATH, "//ion-select[@placeholder='请选择' and contains(.,'开课中')]")
    # 选择已结课的班级状态
    selectFinishStatus_loc = (By.XPATH, "//ion-item[contains(.,'已结课')]")
    # 选择未开课的班级状态
    selectNoFinishStatus_loc = (By.XPATH, "//ion-item[contains(.,'未开课')]")
    # 班级编号输入框
    classCodeInput_loc = (By.XPATH, "//ion-input[@placeholder='班级编号']")
    # 搜索按钮
    searchIcon_loc = (By.XPATH, "//img[@class='search_icon']")
    # 班级列表
    classList_loc = (By.XPATH, "//div[@class='class_list_box ng-star-inserted']")
    # 学员基本信息
    studentInfo_loc = (By.XPATH, "//div[@class='student-info card']")

    # 补课按钮
    cramLessonButt_loc = (By.XPATH, "//div[@class='class_code' and contains(.,'23S01097L173TH8TLNU')]/..//a[text()='补课']")
    # 插班补课列表
    cramLessonList_loc = (By.XPATH, "//div[@class='visible' and contains(.,'课次')]")
    # 弹窗补课按钮
    popupCramLesson_loc = (By.XPATH, "//div[@class='datatable-body-cell-label' and contains(.,'HOW WAS YOUR FLIGHT?')]/..//..//span[text()='补课']")
    # 可补入课时列表
    toCramLessonList_loc = (By.XPATH, "//div[@class='visible' and contains(.,'班级编号')]")

    # 插班补课弹窗-班级编号搜索
    popupClassCodeInput_loc = (By.XPATH, "//div[@class='search-box']")
    # 插班补课弹窗-搜索按钮
    popupSearchButton_loc = (By.XPATH, "//div[@class='search operateButton']")
    # 插班补课弹窗-选择补课课时
    popupSelectIcon_loc = (By.XPATH, "//div[@class='datatable-body-cell-label' and contains(.,'23P01097L260L1SB96H')]/..//..//input[@class='ng-star-inserted']")
    # 插班补课弹窗-补课原因
    popupCramLessonReason_loc = (By.XPATH, "//textarea[@placeholder='请您在此描述原因']")
    # 插班补课弹窗-确定补课按钮
    popupConfirmButton_loc = (By.XPATH, "//button[@class='actionButton ensure cursor']")

    # 退班按钮
    quitClass_loc = (By.XPATH, "//div[@class='class_code' and contains(.,'23P11060L24D9GJK5E8')]/..//a[text()='退班']")
    # 退费原因
    quitReason_loc = (By.XPATH, "//ion-checkbox[@class='ng-valid md interactive hydrated ng-dirty ng-touched ion-valid ion-dirty ion-touched']")
    # 沟通截图
    communicateScreenshot_loc = (By.XPATH, "//div[@class='left_part']")
    # 确认退款按钮
    quitSubmit_loc = ((By.XPATH, "//button[@class='actionButton ensure cursor']"))

